package word418.compclass;

import java.util.Comparator;

public class SchoolObjectComparator
    implements Comparator<school>, java.io.Serializable {
    public int compare(school o1, school o2) {
    double bmi1 = o1.getBmi();
    double bmi2 = o2.getBmi();

    if (bmi1 < bmi2)
      return -1;
    else if (bmi1 == bmi2)
      return 0;
    else
      return 1;
  }
}
